<ion-view view-title="订单">
    <ion-content padding="true">
        <ion-refresher on-refresh="doRefresh()"></ion-refresher>
        <ion-list>
            <ion-item>订单号：{{item.order_id}}</ion-item>
            <ion-item>服务项目：{{item.serviceType}}</ion-item>
            <ion-item>联系人：{{item.name}}</ion-item>
            <ion-item>联系电话：<a href="tel:{{item.phone}}">{{item.phone}}</a></ion-item>
            <ion-item style="overflow:auto;white-space:normal">联系地址：{{item.address}}</ion-item>
            <ion-item style="overflow:auto;white-space:normal">订单详情：{{item.detail}}</ion-item>
            <ion-item>预约时间：{{item.time}}</ion-item>
            <ion-item>下单时间：{{item.create_time}}</ion-item>
        </ion-list>
        <div class="row" style="margin: auto;">
            <div class="col">
                <button class="button button-balanced button-block" ng-click="signIn()">签入</button>
            </div>
            <div class="col">
                <button class="button button-assertive button-block" ng-click="signOut()">签出</button>
            </div>
        </div>
        <div ng-if="state=='scan'">
            <button id="finish-btn"
                    ng-if="item.status == '已接单' || item.status == '试工中' || item.status == '服务中'"
                    ng-show="item.finish_button == 'not_click'"
                    class="button button-balanced button-block" ng-click="update(item)">
                完成
            </button>
            <button ng-if="item.status == '已接单' || item.status == '试工中' || item.status == '服务中'"
                    ng-show="item.finish_button == 'clicked'"
                    class="button button-balanced button-block">
                正在支付
            </button>
        </div>
    </ion-content>
</ion-view>